home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power Programmierung
/
Power-Programmierung (Tewi)(1994).iso
/
elan
/
dragon
/
snowflak.eln
< prev
next >
Wrap
Text File
|
1980-01-01
|
633b
|
21 lines
program:
setup dragon;
start drawing;
draw dragon (days, start cell);
finish drawing.
setup dragon:
LET dragon name = "Koch's snowflake";
LET directions = 6;
LET variants = 6;
LET children = 4;
ROW variants ROW children INT CONST offsprings :: [[0, 1, 5, 0], [1, 2, 0, 1], [2, 3, 1, 2], [3, 4, 2, 3], [4, 5, 3, 4], [5, 0, 4, 5]];
ROW variants INT CONST behavior :: [0, 1, 2, 3, 4, 5];
INT CONST days :: 5;
INT CONST start cell :: 0;
INT CONST size of cell :: 2;
INT CONST start x :: graphics x limit DIV 20;
INT CONST start y :: graphics y limit DIV 4.